<template>
	<view class="dleList">
		<!-- 接收 -->
		<view class="dleItem" v-if="item.touid != userinfo.userid">
			 1111
		</view>
		<!-- 发送 -->
		<view class="dleItem sendOut flex-end"  v-else>
			222
		</view>
	</view>
</template>

<script>
import { mapState } from 'vuex';
export default {
	name: 'dialogue-list',
	data() {
		return {
			info: {}
		};
	},
	props: {
		item: {
			type: Object,
			default: () => {}
		},
		touserName: {
			type: String,
			default: ''
		},
		touserHeadpic: {
			type: String,
			default: ''
		}
	},
	computed: {
		...mapState({
			userinfo: state => state.user.userinfo
		})
	},
	watch: {},
	mounted() {
		console.log('this.item',this.item,typeof(this.item))
	},
	methods: {}
};
</script>

<style lang="scss">
.dleList {
	.dleItem {
		padding-top: 46rpx;
		word-break: break-all;
		align-items: flex-start;

		.item_right {
			padding: 0 24rpx;

			.item_title {
				font-size: 24rpx;
				font-family: PingFang SC-Regular, PingFang SC;
				font-weight: 400;
				color: #666666;
				margin-bottom: 23rpx;
			}

			.item_msg {
				background: #ffffff;
				border-radius: 10rpx;

				.item_content {
					flex: 1;
					font-size: 30rpx;
					font-family: PingFang SC-Regular, PingFang SC;
					font-weight: 400;
					color: #333333;
					padding: 14rpx 27rpx;
				}
			}

			.loading_st {
				width: 90rpx;
				height: 90rpx;
				border-radius: 20rpx;
				background: #ffffff;
				padding: 40rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}

			.image-box {
				position: relative;
			}

			.loadings {
				&::after {
					content: '';
					display: block;
					position: absolute;
					top: 0;
					left: 0;
					width: 100%;
					height: 100%;
					background: url('../../static/images/default/btn-spin.png') no-repeat rgba(1, 1, 1, 0.5);
					background-position: center;
				}

				// height: auto !important;
			}

			.item_goods {
				background: #ffffff;
				align-items: flex-start;
				border-radius: 20rpx;
				padding: 30rpx 20rpx;

				.left {
					width: 176rpx;
					height: 176rpx;
					border-radius: 20rpx;

					image {
						width: 100%;
						height: 100%;
					}
				}

				.center {
					flex: 1;
					padding: 0 20rpx;

					& > view {
						width: 100%;
						margin-bottom: 15rpx;
					}

					& > view:last-child {
						padding-bottom: 0;
					}

					.title {
						font-size: 28rpx;
						font-family: PingFang SC-Regular, PingFang SC;
						font-weight: 600;
						color: #333;
					}

					.Specification {
						font-size: 24rpx;
						font-family: PingFang SC-Regular, PingFang SC;
						font-weight: 400;
						color: #999;
						width: 100%;
					}

					.price-box {
						view {
							width: unset;
						}

						.price {
							font-size: 28rpx;
							font-family: PingFang SC;
							font-weight: 600;
							color: #fa2b47;
						}

						.amount {
							background: linear-gradient(90deg, #fa2b47 0%, #ff6619 100%);
							border-radius: 44rpx;
							padding: 12rpx 20rpx;
							font-size: 24rpx;
							font-family: PingFang SC;
							font-weight: 400;
							color: #ffffff;
						}
					}
				}
			}

			.item_state {
				font-size: 24rpx;
				font-family: PingFang SC-Regular, PingFang SC;
				font-weight: 400;
				color: #ff6619;
				margin-top: 14rpx;
			}
		}
	}

	.sendOut {
		text-align: left;
	}

	.item_time {
		font-size: 24rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #999999;
	}
}
</style>
